from flask import Flask, render_template, url_for, redirect, abort

app = Flask("__main__")

@app.route("/")
def index():
    # return redirect(url_for('hello'))
    return "index"

@app.route('/hello/')
@app.route('/hello/<name>')
def hello(name=None):
    return render_template('hello.html', name=name)

@app.route('/login')
def login():
    abort(401)

@app.errorhandler(404)
def page_not_found(error):
    return render_template('404.html'), 404

if __name__ == '__main__':
    app.run(debug=True)